<extend name="Common@Layout:hui-admin" />
<block name="title"><title>Administator管理后台</title></block>
<block name="style">
</block>

<block name="main">
<div class="pd-20">
	<form action="{:u('Catsadmin/edit_post')}" method="post" class="form form-horizontal validator_form" id="form-user-add">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>父节点：</label>
			<div class="formControls col-6">
				<select name="parentid" class="input-text" style="width:auto;">
					<option value="0">根节点</option>
					{$select_categorys}
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>分类名称：</label>
				<div class="formControls col-5">
				  	<input type="text" class="input-text" value="{$info.cat_name}" placeholder="" name="cat_name"  data-rule="分类名称:required;">
				</div>
			<div class="col-5"> </div>
		</div>
	  	<div class="row cl">
			<label class="form-label col-2">备注：</label>
			<div class="formControls col-5">
	  			<textarea name="cat_desc" cols="" rows="" class="textarea"  placeholder="说点什么...最少输入10个字符" onKeyUp="textarealength(this,100)">{$info.cat_desc}</textarea>
			</div>
			<div class="col-5"> </div>
	  	</div>
	  	<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-4">
				<input type="text" class="input-text" value="{$info.listorder|default=0}" placeholder="" name="listorder" data-rule="排序值:required;">
			</div>
		</div>
	  	<div class="row cl">
	    	<div class="col-9 col-offset-2">
	    		<input type="hidden" name="id" value="{$info['id']}">
	    		<if condition="$info['group_id']">
	    		<input type="hidden" name="group_id" value="{$info['group_id']}">
	    		<else/>
	    		<input type="hidden" name="group_id" value="{$_SESSION['cur_select_group']}">
	    		</if>
	      		<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
	    	</div>
	  	</div>
	</form>
</div>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-user-add").Validform({
		tiptype:2,
		callback:function(form){
			form[0].submit();
			var index = parent.layer.getFrameIndex(window.name);
			parent.$('.btn-refresh').click();
			parent.layer.close(index);
		}
	});

});
parent.shuaxin_nodes();
</script>
</block>